public class StudentDegree {
    public void issueDegree(Manageable manage) {
        try {
            manage.printInfo();
            double average = manage.computeAverage();
            System.out.println("平均成绩: " + average);
            if (manage.getPass()) {
                System.out.println("学位授予: " + (manage instanceof Undergraduate ? Constants.ISSUE_UNDERGRADUATE_DEGREE : Constants.ISSUE_MASTER_DEGREE));
            } else {
                System.out.println("学位授予: " + (manage instanceof Undergraduate ? Constants.UNSATISFACTORY_ISSUE_UNDERGRADUATE_DEGREE : Constants.UNSATISFACTORY_ISSUE_MASTER_DEGREE));
            }
        } catch (Exception e) {
            System.out.println("异常: " + e.getMessage());
        }
    }
}
